package me.mononin.factory.data.helper;

import com.raizlabs.android.dbflow.sql.language.SQLite;

import me.mononin.factory.model.db.Session;
import me.mononin.factory.model.db.Session_Table;
import me.mononin.factory.model.db.User;
import me.mononin.factory.model.db.User_Table;

/**
 * 本地会话辅助工具类
 */
class SessionHelper {

    /**
     * 本地查找会话
     * @param id 会话Id
     * @return 返回Session
     */
    public static Session findFromLocal(String id) {
        return SQLite.select()
                .from(Session.class)
                .where(Session_Table.id.eq(id))
                .querySingle();
    }
}
